
from rest_framework import generics, permissions
from dynamic_rest import viewsets
from . import models, rest_serializers as serializers


class CASViewSet(viewsets.DynamicModelViewSet):
    queryset = models.CAS.objects.all()
    serializer_class = serializers.CASSerializer


class CIDViewSet(viewsets.DynamicModelViewSet):
    queryset = models.CID.objects.all()
    serializer_class = serializers.CIDSerializer


class ChEMBLViewSet(viewsets.DynamicModelViewSet):
    queryset = models.ChEMBL.objects.all()
    serializer_class = serializers.ChEMBLSerializer


class ChEMBL_Assay_idViewSet(viewsets.DynamicModelViewSet):
    queryset = models.ChEMBL_Assay_id.objects.all()
    serializer_class = serializers.ChEMBL_Assay_idSerializer


class ChineseIdentityViewSet(viewsets.DynamicModelViewSet):
    queryset = models.ChineseIdentity.objects.all()
    serializer_class = serializers.ChineseIdentitySerializer


class CompoundViewSet(viewsets.DynamicModelViewSet):
    queryset = models.Compound.objects.all()
    serializer_class = serializers.CompoundSerializer


class EnglishIdentityViewSet(viewsets.DynamicModelViewSet):
    queryset = models.EnglishIdentity.objects.all()
    serializer_class = serializers.EnglishIdentitySerializer


class HerbViewSet(viewsets.DynamicModelViewSet):
    queryset = models.Herb.objects.all()
    serializer_class = serializers.HerbSerializer


class KEGGCompoundViewSet(viewsets.DynamicModelViewSet):
    queryset = models.KEGGCompound.objects.all()
    serializer_class = serializers.KEGGCompoundSerializer


class KEGGPathwayViewSet(viewsets.DynamicModelViewSet):
    queryset = models.KEGGPathway.objects.all()
    serializer_class = serializers.KEGGPathwaySerializer


class KEGGSimilarityViewSet(viewsets.DynamicModelViewSet):
    queryset = models.KEGGSimilarity.objects.all()
    serializer_class = serializers.KEGGSimilaritySerializer


class PrescriptionViewSet(viewsets.DynamicModelViewSet):
    queryset = models.Prescription.objects.all()
    serializer_class = serializers.PrescriptionSerializer


